//
//  MapHelper.h
//  CarCare
//
//  Created by ileo on 14/12/26.
//  Copyright (c) 2014年 baozun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
#import <MAMapKit/MAMapKit.h>
#import <AMapSearchKit/AMapSearchAPI.h>
#import <AMapSearchKit/AMapSearchKit.h>
#import <CoreLocation/CoreLocation.h>
#import "LocAnnotation.h"
#import "LineDashPolyline.h"
#import <AMapFoundationKit/AMapFoundationKit.h>

#define MAPMGR [MapHelper sharedInstance]

@interface MapHelper : NSObject

DEF_SINGLETON

-(NSString *)amapKey;//高德key

#pragma mark - 定位
+(void)checkLocAuthorization;//判断设备是否开启定位
@property (nonatomic, assign) BOOL isLocAuthorization;//是否开启定位
@property (nonatomic, assign) CLLocationCoordinate2D userCoordinate;//当前位置
@property (nonatomic, copy) NSString *currentCity;
@property (nonatomic, strong) AMapReGeocode *currentReGeocode;
-(void)startUpdatingLoc;
-(void)stopUpdatingLoc;

+(void)goNaviToCoordinate:(CLLocationCoordinate2D)coordinate;

/**
 *  得到大概位置
 */
+(NSString *)addressRoughlyFromReGeocode:(AMapReGeocode *)reGeocode;
/**
 *  得到除省市外的位置
 */
+(NSString *)addressRoadFromReGeocode:(AMapReGeocode *)reGeocode;
/**
 *  得到精确位置
 */
+(NSString *)addressPreciseFromReGeocode:(AMapReGeocode *)reGeocode;
/**
 *  得到省市区
 */
+(void)addressFromReGeocode:(AMapReGeocode *)reGeocode result:(void (^)(NSString *province ,NSString *city, NSString *district))result;

@end
